package logic

import (
	"context"
	user "videozg3/common/proto"
	"videozg3/service/server"
)

type ServerUser struct {
	user.UnimplementedUserServer
}

func (s *ServerUser) SendSms(ctx context.Context, in *user.SendSmsReq) (*user.SendSmsResp, error) {
	sms, err := server.SendSms(in)
	if err != nil {
		return nil, err
	}
	return sms, nil
}
func (s *ServerUser) UserLogin(ctx context.Context, in *user.UserLoginReq) (*user.UserLoginResp, error) {
	sms, err := server.UserLogin(in)
	if err != nil {
		return nil, err
	}
	return sms, nil
}

func (s *ServerUser) VideoList(ctx context.Context, in *user.VideoListReq) (*user.VideoListResp, error) {
	sms, err := server.VideoList(in)
	if err != nil {
		return nil, err
	}
	return sms, nil
}

func (s *ServerUser) UserCenter(ctx context.Context, in *user.UserCenterReq) (*user.UserCenterResp, error) {
	sms, err := server.UserCenter(in)
	if err != nil {
		return nil, err
	}
	return sms, nil
}

func (s *ServerUser) AddVideo(ctx context.Context, in *user.AddVideoReq) (*user.AddVideoResp, error) {
	sms, err := server.AddVideo(in)
	if err != nil {
		return nil, err
	}
	return sms, nil
}
